﻿using UnityEngine;

namespace Core
{
    public abstract class UITileElement : UIWidget, IAwake<IUITile, GameObject>
    {
        public IUITile Tile { get; private set; }
        public int Index;

        public void Awake(IUITile tile, GameObject go)
        {
            base.Awake(go);
            Tile = tile;
        }

        public void Dispatch(string key)
        {
            Tile.Dispatch(key, this);
        }
    }
}
